<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>


</head>

<body>

    <p><a href="https://echarts.baidu.com/tutorial.html">5 分钟上手 ECharts</a></p>
    <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
    <div id="main" style="width: 600px;height:400px;"></div>


    <script src="./lib/echart/echarts.js"></script>
    <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        option = {
            backgroundColor: '#1a4377',

            tooltip: {},
            animationDurationUpdate: 1500,
            animationEasingUpdate: 'quinticInOut',
            color: ['#83e0ff', '#45f5ce', '#b158ff'],
            series: [
                {
                    type: 'graph',
                    layout: 'force',
                    force: {
                        repulsion: 1000,
                        edgeLength: 50
                    },
                    roam: true,
                    label: {
                        normal: {
                            show: true
                        }
                    },
                    data: [
                        {
                            name: '校园大数据',

                            symbolSize: 120,
                            draggable: true,
                            category: 0,
                            itemStyle: {
                                normal: {
                                    borderColor: '#04f2a7',
                                    borderWidth: 6,
                                    shadowBlur: 20,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43',
                                }
                            }
                        },
                        {
                            name: '舆情大数据',
                            symbolSize: 100,
                            itemStyle: {
                                normal: {
                                    borderColor: '#04f2a7',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43',
                                }
                            },
                            category: 1,

                        },
                        {
                            name: '用户分析',
                            symbolSize: 80,
                            category: 1,
                            itemStyle: {
                                normal: {
                                    borderColor: '#04f2a7',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43',
                                }
                            },

                        },
                        {
                            name: '话题分析',
                            symbolSize: 80,
                            category: 1,
                            itemStyle: {
                                normal: {
                                    borderColor: '#82dffe',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43',
                                }
                            },

                        },
                        {
                            name: '评论分析',
                            symbolSize: 80,
                            category: 1,
                            itemStyle: {
                                normal: {
                                    borderColor: '#82dffe',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43',
                                }
                            },

                        },
                        {
                            name: '图书馆分析',
                            symbolSize: 100,
                            category: 2,
                            itemStyle: {
                                normal: {
                                    borderColor: '#82dffe',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43',
                                }
                            },

                        },
                        {
                            name: '借阅分析',
                            symbolSize: 80,
                            category: 2,
                            itemStyle: {
                                normal: {
                                    borderColor: '#b457ff',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#b457ff',
                                    color: '#001c43'
                                }
                            },

                        },
                        {
                            name: '借阅排行',
                            symbolSize: 80,
                            itemStyle: {
                                normal: {
                                    borderColor: '#82dffe',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43'

                                }
                            },
                            category: 2,

                        },
                        {
                            name: '图书收录',
                            symbolSize: 80,
                            itemStyle: {
                                normal: {
                                    borderColor: '#82dffe',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43'
                                }
                            },
                            category: 2,

                        },
                        {
                            name: '图书分析',
                            symbolSize: 80,
                            category: 2,
                            itemStyle: {
                                normal: {
                                    borderColor: '#82dffe',
                                    borderWidth: 4,
                                    shadowBlur: 10,
                                    shadowColor: '#04f2a7',
                                    color: '#001c43'
                                }
                            },

                        }],
                    links: [
                        {
                            source: '校园大数据',
                            target: '舆情大数据'

                        },
                        {
                            source: '校园大数据',
                            target: '图书馆分析',
                        },
                        {
                            source: '舆情大数据',
                            target: '用户分析',
                        },
                        {
                            source: '舆情大数据',
                            target: '话题分析',
                        },
                        {
                            source: '舆情大数据',
                            target: '评论分析',
                        },
                        {
                            source: '校园大数据',
                            target: '图书馆分析',
                        },
                        {
                            source: '图书馆分析',
                            target: '图书分析',
                        },
                        {
                            source: '图书馆分析',
                            target: '借阅分析',
                        },
                        {
                            source: '图书馆分析',
                            target: '借阅排行',
                            value: 'DNA',
                        }, {
                            source: '图书馆分析',
                            target: '图书收录'

                        }
                    ],
                    lineStyle: {
                        normal: {
                            opacity: 0.9,
                            width: 5,
                            curveness: 0
                        }
                    },
                    categories: [
                        { name: '0' },
                        { name: '1' },
                        { name: '2' }
                    ]
                }
            ]
        }



        myChart.setOption(option);



    </script>




</body>

</html>